<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');


class Msg_delete extends CI_Controller {

	function __construct()
	{
		parent::__construct();
	}

	public function index()
	{
		$this->load->helper('date');
		$this->load->helper('url');
		$this->load->model('messagedata_m');
		if($_COOKIE['auth']=='3'){
			$this->messagedata_m->msg_del($_GET['id']);
			echo "<script language='javascript' type='text/javascript'>";
			echo 'alert("删除成功!");';
			echo "</script>";
			redirect('?count='.$_GET['count'],'refresh');
		}else{
			echo "<script language='javascript' type='text/javascript'>";
			echo 'alert("权限不足!");';
			echo "</script>";
			redirect('?count=0','refresh');
		}
	}

}
?>